package com.tencreat.domain.mall.dto;

import com.tencreat.common.core.domain.model.ReqPageParam;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.List;

@Data
public class MallGoodsCutDTO extends ReqPageParam implements Serializable {

    @ApiModelProperty("一级分类")
    private Integer oneCategoryId;
    @ApiModelProperty("二级分类")
    private Integer twoCategoryId;

    private List<Long> categoryIds;
    public Integer getTwoCategoryId() {
        if(twoCategoryId == null){
            return 0;
        }
        return twoCategoryId;
    }

    public void setTwoCategoryId(Integer twoCategoryId) {
        this.twoCategoryId =  twoCategoryId == null ? 0 : twoCategoryId;
    }

    public Integer getOneCategoryId() {
        if(twoCategoryId == null){
            return 0;
        }
        return oneCategoryId;
    }
}
